package cn.stazxr.pane;

import javax.swing.*;

/**
 * Package: cn.stazxr.pane
 * ClassName: JTabbedPaneTest
 * @Author: stazxr
 * @Create: 2023/12/15
 * @Version: v1.0
 **/
public class JTabbedPaneTest {
    public static void main(String[] args) {
        JFrame frame = new JFrame("JTabbedPane");
        frame.setBounds(500,500,600,300);

        JTabbedPane pane = new JTabbedPane();
        pane.setBounds(0, 0, 500, 300);
        pane.addTab("一号", new JColorChooser());   //一号面板当颜色选择器
        pane.addTab("二号", new JFileChooser());    //二号面板当文件选择器        frame.add(pane);

        frame.add(pane);
        frame.setVisible(true);
    }
}
